<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>社交平台 - 首页</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary: #165DFF;
            --primary-light: #E8F3FF;
            --primary-dark: #0E42D2;
            --secondary: #36CFC9;
            --success: #52C41A;
            --warning: #FAAD14;
            --danger: #FF4D4F;
            --dark: #1D2129;
            --gray: #86909C;
            --light: #F2F3F5;
            --border: #E5E6EB;
            --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
            --shadow-hover: 0 6px 16px rgba(0, 0, 0, 0.1);
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background-color: #F7F8FA;
            color: var(--dark);
            line-height: 1.6;
        }
        
        /* 导航栏样式 */
        .navbar {
            background-color: white;
            box-shadow: var(--shadow);
            padding: 0.75rem 1rem;
            position: sticky;
            top: 0;
            z-index: 1000;
        }
        
        .navbar-brand {
            font-weight: 700;
            color: var(--primary);
            font-size: 1.5rem;
        }
        
        .nav-link {
            color: var(--dark);
            margin-left: 0.5rem;
            margin-right: 0.5rem;
            font-weight: 500;
            transition: color 0.2s;
            padding: 0.5rem 0.75rem !important;
        }
        
        .nav-link:hover, .nav-link.active {
            color: var(--primary);
        }
        
        .search-bar {
            max-width: 320px;
            width: 100%;
            position: relative;
        }
        
        .search-bar input {
            padding-left: 2.5rem;
            border-radius: 20px;
            background-color: var(--light);
            border: none;
        }
        
        .search-bar i {
            position: absolute;
            left: 1rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gray);
        }
        
        /* 二级导航菜单样式 */
        .dropdown-menu {
            border: none;
            border-radius: 8px;
            box-shadow: var(--shadow-hover);
            padding: 1rem;
            min-width: 500px;
        }
        
        .dropdown-menu.megamenu {
            width: 800px;
        }
        
        .menu-section {
            margin-bottom: 1rem;
        }
        
        .menu-section-title {
            font-weight: 600;
            color: var(--primary);
            margin-bottom: 0.75rem;
            font-size: 1rem;
        }
        
        .menu-items {
            display: flex;
            flex-wrap: wrap;
            gap: 0.75rem 1.5rem;
        }
        
        .menu-item {
            display: flex;
            align-items: center;
            white-space: nowrap;
            color: var(--dark);
            text-decoration: none;
            transition: color 0.2s;
            font-size: 0.95rem;
        }
        
        .menu-item:hover {
            color: var(--primary);
        }
        
        .menu-item i {
            margin-right: 0.5rem;
            font-size: 1.1rem;
            width: 20px;
            text-align: center;
        }
        
        .divider {
            border-top: 1px solid var(--border);
            margin: 1rem 0;
        }
        
        /* 主内容区 */
        .main-content {
            padding: 2rem 0;
        }
        
        /* 内容卡片样式 */
        .content-card {
            background-color: white;
            border-radius: 12px;
            box-shadow: var(--shadow);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        .section-title {
            font-size: 1.5rem;
            font-weight: 600;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
        }
        
        .section-title i {
            color: var(--primary);
            margin-right: 0.5rem;
        }
        
        /* 推荐内容网格 */
        .content-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 1.5rem;
        }
        
        .post-card {
            border-radius: 8px;
            overflow: hidden;
            background-color: white;
            box-shadow: var(--shadow);
            transition: transform 0.2s, box-shadow 0.2s;
        }
        
        .post-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
        }
        
        .post-image {
            width: 100%;
            aspect-ratio: 1;
            object-fit: cover;
        }
        
        .post-content {
            padding: 1rem;
        }
        
        .post-author {
            display: flex;
            align-items: center;
            margin-bottom: 0.75rem;
        }
        
        .author-avatar {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 0.75rem;
        }
        
        .author-name {
            font-weight: 600;
            font-size: 0.9rem;
        }
        
        .post-text {
            font-size: 0.95rem;
            margin-bottom: 0.75rem;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        
        .post-actions {
            display: flex;
            justify-content: space-between;
            font-size: 0.85rem;
            color: var(--gray);
        }
        
        .post-action {
            display: flex;
            align-items: center;
            cursor: pointer;
            transition: color 0.2s;
        }
        
        .post-action:hover {
            color: var(--primary);
        }
        
        .post-action i {
            margin-right: 0.35rem;
        }
        
        /* 响应式设计 */
        @media (max-width: 992px) {
            .dropdown-menu.megamenu {
                width: 600px;
            }
        }
        
        @media (max-width: 768px) {
            .dropdown-menu,
            .dropdown-menu.megamenu {
                min-width: auto;
                width: 100%;
                max-width: 300px;
            }
            
            .menu-items {
                gap: 0.5rem 1rem;
            }
            
            .search-bar {
                max-width: 200px;
            }
        }
        
        @media (max-width: 576px) {
            .main-content {
                padding: 1.5rem 0;
            }
            
            .content-grid {
                grid-template-columns: 1fr;
            }
            
            .search-bar {
                max-width: 100%;
                margin: 1rem 0;
            }
        }
    </style>
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg">
        <div class="container">
            <a class="navbar-brand" href="#">社交平台</a>
            
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <i class="fas fa-bars"></i>
            </button>
            
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item">
                        <a class="nav-link active" aria-current="page" href="#"><i class="fas fa-home me-1"></i> 首页</a>
                    </li>
                    
                    <!-- 发现栏目 - 带多行二级菜单 -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                            <i class="fas fa-compass me-1"></i> 发现
                        </a>
                        <div class="dropdown-menu megamenu">
                            <div class="menu-section">
                                <div class="menu-section-title">热门分类</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-music"></i> 音乐</a>
                                    <a href="#" class="menu-item"><i class="fas fa-film"></i> 影视</a>
                                    <a href="#" class="menu-item"><i class="fas fa-book"></i> 读书</a>
                                    <a href="#" class="menu-item"><i class="fas fa-utensils"></i> 美食</a>
                                    <a href="#" class="menu-item"><i class="fas fa-plane"></i> 旅行</a>
                                    <a href="#" class="menu-item"><i class="fas fa-dumbbell"></i> 健身</a>
                                    <a href="#" class="menu-item"><i class="fas fa-gamepad"></i> 游戏</a>
                                    <a href="#" class="menu-item"><i class="fas fa-paint-brush"></i> 艺术</a>
                                </div>
                            </div>
                            
                            <div class="divider"></div>
                            
                            <div class="menu-section">
                                <div class="menu-section-title">热门话题</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-hashtag"></i> 夏日旅行计划</a>
                                    <a href="#" class="menu-item"><i class="fas fa-hashtag"></i> 职场生存指南</a>
                                    <a href="#" class="menu-item"><i class="fas fa-hashtag"></i> 健康饮食分享</a>
                                    <a href="#" class="menu-item"><i class="fas fa-hashtag"></i> 电影推荐</a>
                                    <a href="#" class="menu-item"><i class="fas fa-hashtag"></i> 读书笔记</a>
                                    <a href="#" class="menu-item"><i class="fas fa-hashtag"></i> 摄影作品</a>
                                </div>
                            </div>
                            
                            <div class="divider"></div>
                            
                            <div class="menu-section">
                                <div class="menu-section-title">推荐活动</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-calendar-alt"></i> 城市马拉松</a>
                                    <a href="#" class="menu-item"><i class="fas fa-calendar-alt"></i> 音乐节</a>
                                    <a href="#" class="menu-item"><i class="fas fa-calendar-alt"></i> 美食节</a>
                                    <a href="#" class="menu-item"><i class="fas fa-calendar-alt"></i> 摄影展</a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <!-- 视频栏目 - 带多行二级菜单 -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                            <i class="fas fa-video me-1"></i> 视频
                        </a>
                        <div class="dropdown-menu">
                            <div class="menu-section">
                                <div class="menu-section-title">视频分类</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-music"></i> 音乐现场</a>
                                    <a href="#" class="menu-item"><i class="fas fa-film"></i> 电影片段</a>
                                    <a href="#" class="menu-item"><i class="fas fa-graduation-cap"></i> 教学视频</a>
                                    <a href="#" class="menu-item"><i class="fas fa-laugh-beam"></i> 搞笑视频</a>
                                    <a href="#" class="menu-item"><i class="fas fa-dumbbell"></i> 健身教程</a>
                                    <a href="#" class="menu-item"><i class="fas fa-utensils"></i> 美食制作</a>
                                    <a href="#" class="menu-item"><i class="fas fa-plane"></i> 旅行记录</a>
                                    <a href="#" class="menu-item"><i class="fas fa-code"></i> 编程教学</a>
                                </div>
                            </div>
                            
                            <div class="divider"></div>
                            
                            <div class="menu-section">
                                <div class="menu-section-title">热门频道</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-user-circle"></i> 科技前沿</a>
                                    <a href="#" class="menu-item"><i class="fas fa-user-circle"></i> 美食探店</a>
                                    <a href="#" class="menu-item"><i class="fas fa-user-circle"></i> 旅行日记</a>
                                    <a href="#" class="menu-item"><i class="fas fa-user-circle"></i> 生活技巧</a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <!-- 社区栏目 - 带多行二级菜单 -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                            <i class="fas fa-users me-1"></i> 社区
                        </a>
                        <div class="dropdown-menu">
                            <div class="menu-section">
                                <div class="menu-section-title">兴趣社群</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-pen-fancy"></i> 写作社群</a>
                                    <a href="#" class="menu-item"><i class="fas fa-camera"></i> 摄影社群</a>
                                    <a href="#" class="menu-item"><i class="fas fa-music"></i> 音乐社群</a>
                                    <a href="#" class="menu-item"><i class="fas fa-book"></i> 读书社群</a>
                                    <a href="#" class="menu-item"><i class="fas fa-paint-brush"></i> 绘画社群</a>
                                    <a href="#" class="menu-item"><i class="fas fa-gamepad"></i> 游戏社群</a>
                                </div>
                            </div>
                            
                            <div class="divider"></div>
                            
                            <div class="menu-section">
                                <div class="menu-section-title">社区服务</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-question-circle"></i> 帮助中心</a>
                                    <a href="#" class="menu-item"><i class="fas fa-shield-alt"></i> 社区规范</a>
                                    <a href="#" class="menu-item"><i class="fas fa-user-plus"></i> 邀请好友</a>
                                    <a href="#" class="menu-item"><i class="fas fa-flag"></i> 举报中心</a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <!-- 消息栏目 - 带二级菜单 -->
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                            <i class="fas fa-bell me-1"></i> 消息
                        </a>
                        <div class="dropdown-menu">
                            <div class="menu-section">
                                <div class="menu-section-title">消息通知</div>
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-heart"></i> 点赞通知</a>
                                    <a href="#" class="menu-item"><i class="fas fa-comment"></i> 评论通知</a>
                                    <a href="#" class="menu-item"><i class="fas fa-share"></i> 分享通知</a>
                                    <a href="#" class="menu-item"><i class="fas fa-user-plus"></i> 关注通知</a>
                                </div>
                            </div>
                            
                            <div class="divider"></div>
                            
                            <div class="menu-section">
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-cog"></i> 消息设置</a>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
                
                <div class="search-bar d-flex">
                    <i class="fas fa-search"></i>
                    <input type="search" class="form-control" placeholder="搜索内容、用户或话题">
                </div>
                
                <ul class="navbar-nav ms-3">
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown">
                            <img src="https://picsum.photos/100/100?random=1" alt="用户头像" class="rounded-circle" style="width: 36px; height: 36px; object-fit: cover;">
                        </a>
                        <div class="dropdown-menu dropdown-menu-end">
                            <div class="menu-section">
                                <div class="menu-items">
                                    <a href="#" class="menu-item"><i class="fas fa-user"></i> 个人主页</a>
                                    <a href="#" class="menu-item"><i class="fas fa-cog"></i> 设置</a>
                                    <a href="#" class="menu-item"><i class="fas fa-sign-out-alt"></i> 退出登录</a>
                                </div>
                            </div>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
    
    <div class="container main-content">
        <!-- 推荐内容 -->
        <div class="content-card">
            <h2 class="section-title"><i class="fas fa-star"></i> 为你推荐</h2>
            
            <div class="content-grid">
                <div class="post-card">
                    <img src="https://picsum.photos/600/600?random=10" alt="旅行照片" class="post-image">
                    <div class="post-content">
                        <div class="post-author">
                            <img src="https://picsum.photos/100/100?random=11" alt="用户头像" class="author-avatar">
                            <span class="author-name">旅行爱好者</span>
                        </div>
                        <div class="post-text">分享一组上周在海边拍摄的照片，天气真的太好了，海水湛蓝清澈，推荐大家去看看！</div>
                        <div class="post-actions">
                            <div class="post-action"><i class="far fa-heart"></i> 245</div>
                            <div class="post-action"><i class="far fa-comment"></i> 36</div>
                            <div class="post-action"><i class="far fa-share-square"></i> 12</div>
                        </div>
                    </div>
                </div>
                
                <div class="post-card">
                    <img src="https://picsum.photos/600/600?random=12" alt="美食照片" class="post-image">
                    <div class="post-content">
                        <div class="post-author">
                            <img src="https://picsum.photos/100/100?random=13" alt="用户头像" class="author-avatar">
                            <span class="author-name">美食家小李</span>
                        </div>
                        <div class="post-text">今天尝试做了一道新菜，香煎三文鱼配芦笋，味道很不错，分享给大家做法...</div>
                        <div class="post-actions">
                            <div class="post-action"><i class="far fa-heart"></i> 189</div>
                            <div class="post-action"><i class="far fa-comment"></i> 42</div>
                            <div class="post-action"><i class="far fa-share-square"></i> 28</div>
                        </div>
                    </div>
                </div>
                
                <div class="post-card">
                    <img src="https://picsum.photos/600/600?random=14" alt="读书照片" class="post-image">
                    <div class="post-content">
                        <div class="post-author">
                            <img src="https://picsum.photos/100/100?random=15" alt="用户头像" class="author-avatar">
                            <span class="author-name">书虫一枚</span>
                        </div>
                        <div class="post-text">最近在读这本书，内容很有深度，尤其是关于人性的探讨，值得推荐给大家。</div>
                        <div class="post-actions">
                            <div class="post-action"><i class="far fa-heart"></i> 326</div>
                            <div class="post-action"><i class="far fa-comment"></i> 58</div>
                            <div class="post-action"><i class="far fa-share-square"></i> 45</div>
                        </div>
                    </div>
                </div>
                
                <div class="post-card">
                    <img src="https://picsum.photos/600/600?random=16" alt="摄影照片" class="post-image">
                    <div class="post-content">
                        <div class="post-author">
                            <img src="https://picsum.photos/100/100?random=17" alt="用户头像" class="author-avatar">
                            <span class="author-name">摄影爱好者</span>
                        </div>
                        <div class="post-text">清晨的城市，光线刚刚好，随手拍了一张，分享给喜欢摄影的朋友们。</div>
                        <div class="post-actions">
                            <div class="post-action"><i class="far fa-heart"></i> 278</div>
                            <div class="post-action"><i class="far fa-comment"></i> 31</div>
                            <div class="post-action"><i class="far fa-share-square"></i> 19</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        
        <!-- 热门话题 -->
        <div class="content-card">
            <h2 class="section-title"><i class="fas fa-fire-alt"></i> 热门话题</h2>
            
            <div class="row">
                <div class="col-md-6">
                    <div class="d-flex align-items-center p-3 border-bottom border-light">
                        <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                            <i class="fas fa-utensils fa-lg"></i>
                        </div>
                        <div>
                            <h5 class="mb-1">#夏日美食推荐#</h5>
                            <p class="text-muted mb-0 small">12.5k 帖子 · 32.8k 参与</p>
                        </div>
                    </div>
                    
                    <div class="d-flex align-items-center p-3 border-bottom border-light">
                        <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                            <i class="fas fa-plane fa-lg"></i>
                        </div>
                        <div>
                            <h5 class="mb-1">#暑期旅行计划#</h5>
                            <p class="text-muted mb-0 small">8.7k 帖子 · 25.3k 参与</p>
                        </div>
                    </div>
                </div>
                
                <div class="col-md-6">
                    <div class="d-flex align-items-center p-3 border-bottom border-light">
                        <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                            <i class="fas fa-book fa-lg"></i>
                        </div>
                        <div>
                            <h5 class="mb-1">#年度好书推荐#</h5>
                            <p class="text-muted mb-0 small">6.3k 帖子 · 18.2k 参与</p>
                        </div>
                    </div>
                    
                    <div class="d-flex align-items-center p-3 border-bottom border-light">
                        <div class="bg-primary-light text-primary p-3 rounded-circle me-3">
                            <i class="fas fa-film fa-lg"></i>
                        </div>
                        <div>
                            <h5 class="mb-1">#高分电影分享#</h5>
                            <p class="text-muted mb-0 small">9.4k 帖子 · 29.7k 参与</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 为导航栏项目添加交互效果
            const navLinks = document.querySelectorAll('.nav-link');
            navLinks.forEach(link => {
                link.addEventListener('click', function() {
                    navLinks.forEach(l => l.classList.remove('active'));
                    this.classList.add('active');
                });
            });
            
            // 为帖子卡片的互动按钮添加交互
            const likeButtons = document.querySelectorAll('.post-action i.far.fa-heart');
            likeButtons.forEach(button => {
                button.addEventListener('click', function(e) {
                    e.stopPropagation();
                    this.classList.toggle('far');
                    this.classList.toggle('fas');
                    this.classList.toggle('text-danger');
                    
                    // 更新点赞数量
                    const parent = this.parentElement;
                    let count = parseInt(parent.textContent.trim().split(' ')[1]);
                    if (this.classList.contains('fas')) {
                        parent.innerHTML = `<i class="${this.classList.value}"></i> ${count + 1}`;
                    } else {
                        parent.innerHTML = `<i class="${this.classList.value}"></i> ${count - 1}`;
                    }
                });
            });
        });
    </script>
</body>
</html>
    
